package zhuoer.adv1;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class FileRead2 {

	public static void main(String[] args) {
		FileInputStream fin = null;
		try {
			fin = new FileInputStream(new File("e:/a/b/Birthday1.java"));
			System.out.println("流中可以读取的字节数：" + fin.available());
			byte[] b = new byte[100];// 缓冲
			int len = 0;
			while ((len = fin.read(b)) > 0) {
				String s = new String(b, 0, len);
				System.out.println(s);
			}
		} catch (Exception e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}

	}

}
